import { defineStore } from 'pinia'
import storage from '@/utils/storage'

export const useUserStore = defineStore('user',{
  state() {
    return {
      username: storage.getItem('username') ||'',
      nickname: storage.getItem('nickname') || '',
      user: JSON.parse(<string>localStorage.getItem('user'))
    }
  }
})
